package VN.EDU.IMIC.DEVELOPER.DOTHANHTUNG.ARRAYBAI9;

public class View {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		/***
		 * khoi tao array 2 chieu
		 * 
		 * @row: employee
		 * @column: hour
		 */

		double[][] employee = new double[7][7];
		// them gia tri cho employee 1
		employee[0][0] = 2;
		employee[0][1] = 4;
		employee[0][2] = 3;
		employee[0][3] = 4;
		employee[0][4] = 5;
		employee[0][5] = 8;
		employee[0][6] = 8;

		// them gia tri cho employee 2
		employee[1][0] = 7;
		employee[1][1] = 3;
		employee[1][2] = 4;
		employee[1][3] = 3;
		employee[1][4] = 3;
		employee[1][5] = 4;
		employee[1][6] = 4;

		// them gia tri cho employee 3
		employee[2][0] = 3;
		employee[2][1] = 3;
		employee[2][2] = 4;
		employee[2][3] = 3;
		employee[2][4] = 3;
		employee[2][5] = 2;
		employee[2][6] = 2;

		// them gia tri cho employee 4
		employee[3][0] = 9;
		employee[3][1] = 3;
		employee[3][2] = 4;
		employee[3][3] = 7;
		employee[3][4] = 3;
		employee[3][5] = 4;
		employee[3][6] = 1;
		// them gia tri cho employee 5
		employee[4][0] = 3;
		employee[4][1] = 5;
		employee[4][2] = 4;
		employee[4][3] = 3;
		employee[4][4] = 6;
		employee[4][5] = 3;
		employee[4][6] = 8;

		// them gia tri cho employee 6
		employee[5][0] = 3;
		employee[5][1] = 4;
		employee[5][2] = 4;
		employee[5][3] = 6;
		employee[5][4] = 3;
		employee[5][5] = 4;
		employee[5][6] = 4;
		// them gia tri cho employee 7
		employee[6][0] = 3;
		employee[6][1] = 7;
		employee[6][2] = 4;
		employee[6][3] = 8;
		employee[6][4] = 3;
		employee[6][5] = 8;
		employee[6][6] = 4;

		// khoi tao controller truyen tham so la mang 2 chieu
		Controller c_obj = new Controller();

		// thuc thi
		double[] result = c_obj.calTotal(employee);
		for (int i = 0; i < result.length; i++) {
			System.out.println(result[i]);
		}
		//37 20 28 28 31 34 32 (sort)
		//34 28 20 31 32 28 37 (unsort)
	}

}
